<?php
namespace app\jiangnan\controller;
use think\Db;
use think\Controller;
use think\Log;
use app\service\roomService;
class Room extends Controller{

	public function disgroup(){
		$group = (new roomService())->disgroup();
        return json_encode($group);
	}

	public function disbuilding(){
        $building = (new roomService())->disbuilding();
        return json_encode($building);
	}

	public function disunit(){
        $building = request()->post('building');
        $unit = (new roomService())->disunit($building);
        return json_encode($unit);
	}

	public function disroom(){
        $building = request()->post('building');
        $unit = request()->post('unit');
        $room = (new roomService())->disroom($building,$unit);
        return json_encode($room);
	}

	//
}